﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WenSkin.Design.Designer
{
    public class TextBoxComponentDesigner : ComponentDesigner
    {
        public string Text
        {
            get
            {
                return TypeDescriptor.GetProperties(base.Component)["Text"].GetValue(base.Component)?.ToString();
            }
            set
            {
                TypeDescriptor.GetProperties(base.Component)["Text"].SetValue(base.Component, value);
            }
        }
        public override void DoDefaultAction()
        {
            base.DoDefaultAction();
            var picker = new EditForm.MultilineTextEditForm(Text);
            if (picker.ShowDialog() == DialogResult.OK)
            {
                Text = picker.Message;
            }
        }
    }
}